#include"Gen_Ressources.h"
using namespace std;


// Ressource
Ressource::Ressource(string type, int posX, int posY, int concentration){
	this->type = type;
	this->posX = posX;
	this->posY = posY;
	this->concentration = concentration;
	this->size = 10;
}

Ressource::~Ressource(){

}

string Ressource::choixCouleur(){
	if(this->type == "fer")
		return "grey";
	else if(this->type == "petrole")
		return "black";
	else if(this->type == "titane")
		return "white";
	else if(this->type == "or")
		return "gold";
	else if(this->type == "argent")
		return "burlywood4";
	else if(this->type == "cuivre")
		return "red";
	else if(this->type == "gaz")
		return "LightPink";
}

int Ressource::selection(int clicX, int clicY){
	if(clicX >= (this->posX - this->size/2) && clicX<= (this->posX + this->size/2) && 
		clicY >= (this->posY - this->size/2) && clicY<= (this->posY + this->size/2))
		return 1;
	else
		return 0;
}

//Gisement
Gisement::Gisement(std::string type, int posX, int posY){
	this->posX = posX;
	this->posY = posY;
	this->type = type;
}

Gisement::~Gisement(){
	
}